$ ->
  # close bootstrap flash
  $(".close").click (e) ->
    $(@).parent().remove()

  controller = $("body").data("controller")
  action = $("body").data("action")

  # user/show page 
  # tabs show
  if (controller == "users" && action == "show") || (controller == "groups" && action = "show")
    $('#myTab a').click (e) ->
      e.preventDefault()
      $(this).tab('show')
